<?php

class Product extends DirModel
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'ut_product';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('ut_product_name', 'required'),
			array('ut_product_name', 'length', 'max'=>255),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'ur_product_id' => 'Id',
			'ut_product_name' => 'Вид продукции',
		);
	}

}